<style>
    .hidden {
        display: none;
    }
</style>
<div class="layui-form" lay-filter="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
    <!-- <div class="layui-form-item">
        <label class="layui-form-label">logoID</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="logoId" value="{{ d.params.logoId || '' }}" lay-verify="logoId" autocomplete="off" class="layui-input">
            </script>
        </div>

    </div> -->
    <div class="layui-form-item">
        <label class="layui-form-label">页面顶部</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="pageTop" value="{{ d.params.pageTop || '' }}" lay-verify="pageTop" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">公司名称</label>
            <div class="layui-input-inline">
                <script type="text/html" template>
                    <input type="text" name="name" value="{{ d.params.name || '' }}" autocomplete="off" class="layui-input">
                </script>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备案号</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="recordNo" value="{{ d.params.recordNo || '' }}" lay-verify="recordNo" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公司地址</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="address" value="{{ d.params.address || '' }}" lay-verify="address" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">英文地址</label>
            <div class="layui-input-inline" style="width: 100px;">
                <script type="text/html" template>
                    <input type="text" name="address" value="{{ d.params.address || '' }}" lay-verify="address" autocomplete="off" class="layui-input">
                </script>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-inline" style="width: 100px;">
                <script type="text/html" template>
                    <input type="tel" name="phone" value="{{ d.params.phone || '' }}" lay-verify="phone" autocomplete="off" class="layui-input">
                </script>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">邮箱地址</label>
            <div class="layui-input-inline" style="width: 100px;">
                <script type="text/html" template>
                    <input type="email" name="email" value="{{ d.params.email || '' }}" lay-verify="email" autocomplete="off" class="layui-input">
                </script>
            </div>
        </div>
    </div>
    <div class="btn-one">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>上传顶部logo</legend>
        </fieldset>
        <div class="layui-upload-drag" style="text-align: left;">
            <i class="layui-icon test2"></i>
            <p>点击上传顶部logo</p>
            <script type="text/html" template>
                <div class="{{d.params.logoId?'':'layui-hide'}}" id="uploadDemoView2">
                    <hr>
                    <img src="{{ d.params.topLogo || '' }}" style="max-width: 196px" />
                    <input class="hidden" name="topLogo" value="{{ d.params.topLogo || '' }}">
                </div>
            </script>
        </div>
    </div>
    <div class="btn-one">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>上传底部logo</legend>
        </fieldset>
        <div class="layui-upload-drag" style="text-align: left;">
            <i class="layui-icon test3"></i>
            <p>点击上传底部logo</p>
            <script type="text/html" template>
                <div class="{{d.params.logoId?'':'layui-hide'}}" id="uploadDemoView3">
                    <hr>
                    <img src="{{ d.params.bottomLogo || '' }}" style="max-width: 196px" />
                    <input class="hidden" name="bottomLogo" value="{{ d.params.bottomLogo || '' }}">
                </div>
            </script>
        </div>
    </div>
    <div class="btn-one">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>上传二维码</legend>
        </fieldset>
        <div class="layui-upload-drag" style="text-align: left;">
            <i class="layui-icon test4"></i>
            <p>点击上传二维码</p>
            <script type="text/html" template>
                <div class="{{d.params.logoId?'':'layui-hide'}}" id="uploadDemoView4">
                    <hr>
                    <img src="{{ d.params.codeImg || '' }}" style="max-width: 196px" />
                    <input class="hidden" name="codeImg" value="{{ d.params.codeImg || '' }}">
                </div>
            </script>
        </div>
    </div>
    <div class="btn-five" style=" margin: 30px 0px 0px 110px;">
        <div class="layui-input-inline">
            <input type="button" id="okbtn" lay-submit lay-filter="LAY-user-front-submit" value="确认" class="layui-btn" style="margin-bottom: 30px;">
        </div>
    </div>
</div>

<script>
    layui.use('upload', function() {
        var $ = layui.jquery,
            setter = layui.setter,
            upload = layui.upload;
        //上传图片
        upload.render({
            elem: '.test2',
            url: setter.request.baseUrl + '/upload/admin/file',
            exts: 'jpg|png|jpeg',
            done: function(res) {
                layer.msg('上传成功');
                layui.$('#uploadDemoView2').removeClass('layui-hide').find('img').attr('src', res.data.src);
                $("input[name='topLogo']").val(res.data.src)
            }
        });
        upload.render({
            elem: '.test3',
            url: setter.request.baseUrl + '/upload/admin/file',
            exts: 'jpg|png|jpeg',
            done: function(res) {
                layer.msg('上传成功');
                layui.$('#uploadDemoView3').removeClass('layui-hide').find('img').attr('src', res.data.src);
                $("input[name='bottomLogo']").val(res.data.src)
            }
        });
        upload.render({
            elem: '.test4',
            url: setter.request.baseUrl + '/upload/admin/file',
            exts: 'jpg|png|jpeg',
            done: function(res) {
                layer.msg('上传成功');
                layui.$('#uploadDemoView4').removeClass('layui-hide').find('img').attr('src', res.data.src);
                $("input[name='codeImg']").val(res.data.src)
            }
        });

    });
</script>